package 编程题;
//分解因数

import java.util.*;


public class Num_7_31_02{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextLine()){
            String str = sc.nextLine();

            int n1 = 0;
            int n2 = 0;
            int i = 0;
            while( i < str.length() && str.charAt(i) != '<' ){
                char ch = str.charAt(i);
                n1 *= 10;
                n1 += (int)(ch - '0');

                i ++;
            }
            i += 5;
            while( i < str.length() && str.charAt(i) != '<' ){
                char ch = str.charAt(i);
                n2 *= 10;
                n2 += (int)(ch - '0');

                i ++;
            }

            print(n1,n2);

        }
    }

    private static void print(int n1, int n2) {
        ArrayList<Integer> arr1 = new ArrayList<>();
        ArrayList<Integer> arr2 = new ArrayList<>();
        int rep1 = n1;
        int rep2 = n2;
        int i = 2;
        while(i <= Math.sqrt(n1)){
            if(n1 % i == 0){
                while (n1 % i == 0){
                    arr1.add(i);
                    n1 /= i;
                }
            }else {
                i ++;
            }
        }
        i = 2;
        while(i <= Math.sqrt(n2)){
            if(n2 % i == 0){
                while (n2 % i == 0){
                    arr2.add(i);
                    n2 /= i;
                }
            }else {
                i ++;
            }
        }

        System.out.printf("%d = ", rep1);
        for (int j = 0; j < arr1.size(); j++) {
            if(j != arr1.size() - 1){
                System.out.print(arr1.get(j) + " * ");
            }else{
                System.out.print(arr1.get(j) + "<br/>");
            }
        }

        System.out.printf("%d = ", rep2);

        for (int j = 0; j < arr2.size(); j++) {
            if(j != arr2.size() - 1){
                System.out.print(arr2.get(j) + " * ");
            }else{
                System.out.print(arr2.get(j));
            }
        }
        System.out.println();
    }

}
//1257954<br/>1257998
//10 = 2 * 5<br/>18 = 2 * 3 * 3